#pragma once
#ifndef _BLOCKPLUS_H
#define _BLOCKPLUS_H

#include "Block.h"

namespace Game {
	class BlockPlus :public Game::Block {
	public:
		BlockPlus();
		~BlockPlus();
		void drop();
		void reback();
		void rotate(int offset);
		void draw(const int leftMargin, const int topMargin);
		void drawAdvanceBlock(const int leftMargin, const int topMargin);
		void moveLeftRight(int offset);
		bool isPositionCorrect(const Map& map);
		void solidify(Map& map);
	private:
		int shift;
		int blockType;
		struct Position {
			int dx; // row
			int dy; // col
		};
		std::vector<Position> smallBlocks{ std::vector<Position>(5) };
		std::shared_ptr<IMAGE> img;
		static const std::vector<std::vector<int>> blockShape;
		static int smallBlockSize;
	};

}

#endif // !_BLOCKPLUS_H
